class UserTable{

  String nickname;
  String age;
  String uid;
  String icon;

  Map<String, dynamic> toMap() {
    var map = new Map<String, dynamic>();
    map['nickname'] = nickname;
    map['age'] = age;
    map['uid'] = uid;
    map['icon'] = icon;
    return map;
  }

  static UserTable fromMap(Map<String, dynamic> map) {
    UserTable user = new UserTable();
    user.nickname = map['nickname'];
    user.age = map['age'];
    user.uid = map['uid'];
    user.icon = map['icon'];
    return user;
  }
  static List<UserTable> fromMapList(dynamic mapList) {
    List<UserTable> list = new List(mapList.length);
    for (int i = 0; i < mapList.length; i++) {
      list[i] = fromMap(mapList[i]);
    }
    return list;
  }
}